diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-11-29 18:07:20 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-29 18:07:20 +0100 |
| commit | d363306235f2a48f16e488f20f73e2233ddcf281 (patch) | |
| tree | 5e86a7b5f38416d7ee56a9aff5ef972aa73d82b1 /src/pages/thematique/[slug].tsx | |
| parent | dfa894b76ee3584bf169710c78c57330c5d6ee67 (diff) | |
refactor(pages): improve Homepage
* move custom homepage components that does not require props to the
MDX file (links should not need to be translated here but where they
are defined)
* move SEO title and meta desc to MDX file
* make Page component the wrapper instead of using a React fragment
* fix MDX module types
Diffstat (limited to 'src/pages/thematique/[slug].tsx')
| -rw-r--r-- | src/pages/thematique/[slug].tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 9ea52e1..3d1e966 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -52,7 +52,7 @@ const ThematicPage: NextPageWithLayout<ThematicPageProps> = ({ const intl = useIntl(); const { items: breadcrumbItems, schema: breadcrumbSchema } = useBreadcrumb({ title, - url: `${ROUTES.THEMATICS.INDEX}/${slug}`, + url: `${ROUTES.THEMATICS}/${slug}`, }); const { asPath } = useRouter(); @@ -189,8 +189,7 @@ export const getStaticProps: GetStaticProps<ThematicPageProps> = async ({ ); const allThematicsLinks = allThematics.filter( (thematic) => - thematic.url !== - `${ROUTES.THEMATICS.INDEX}/${(params as ThematicParams).slug}` + thematic.url !== `${ROUTES.THEMATICS}/${(params as ThematicParams).slug}` ); const translation = await loadTranslation(locale); |
